<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%
  content_for :page_title, t('Gradebook - %{context_name}', context_name: @context.name)
  @body_classes << "gradebook full-width"
  @show_left_side = true
  @collapse_course_menu = true
  @show_embedded_chat = false
  css_bundle :slickgrid, :gradezilla
  js_bundle :gradezilla
%>
<div id="keyboard_navigation"></div>
<div id="gradebook_wrapper">
  <div class="assignment-gradebook-container hidden">
    <div id="gradebook-toolbar" class="toolbar">
      <div class="gradebook-menus">
        <span data-component="GradebookMenu" data-variant="DefaultGradebook"></span>
        <span data-component="ViewOptionsMenu"></span>
        <span data-component="ActionMenu"></span>
      </div>

      <div id="gradebook-actions">
        <button id="keyboard-shortcuts" class="Button--icon-action Button--active" type="button">
          
          <i class="icon-keyboard-shortcuts"></i>
        </button>

        <% if multiple_assignment_groups? %>
            <div class="gradebook-filter-container" id="assignment-group-filter-container"></div>
        <% end %>

        <% if grading_periods? %>
          <div class="gradebook-filter-container" id="grading-periods-filter-container"></div>
        <% end %>

        <% if visible_modules? %>
          <div class="gradebook-filter-container" id="modules-filter-container"></div>
        <% end %>

        <% if multiple_sections? %>
          <div class="gradebook-filter-container" id="sections-filter-container"></div>
        <% end %>

        <div class="gradebook-filter-container gradebook_filter" id="search-filter-container">
          <% placeholder = t('Search…') %>
          <input
            type="text"
            class="search-query"
            placeholder="<%= placeholder %>"
            aria-label="<%= placeholder %>"
            aria-disabled="true"
            disabled
          >
        </div>

        <div class="gradebook_menu">
          <span id="gradebook-settings-modal-button-container"></span>
          <span data-component="GradebookSettingsModal"></span>
        </div>
      </div>
    </div>
    <div id="gradebook-grid-wrapper" class="use-css-transitions-for-show-hide" style="display:none;">
      <div id="gradebook_grid"></div>
    </div>
    <div style="display:none;">
      {{> views/shared/message_students}}
      {{> views/submissions/submission_download}}
    </div>
  </div>

  <% if @context.feature_enabled?(:outcome_gradebook) %>
    <div class="outcome-gradebook-container">
      <div class="outcome-menus hidden" style="text-align: right;">
        <span data-component="SectionFilter"></span>
        <span data-component="GradebookMenu" data-variant="DefaultGradebookLearningMastery"></span>
      </div>
      <div class="outcome-gradebook hidden"></div>
    </div>
  <% end %>
  <span data-component="GridColor"></span>
  <span data-component="StatusesModal"></span>
</div>
